package net.csdra.libraryborrowing.service;

import net.csdra.libraryborrowing.domain.Address;

import java.nio.file.AccessDeniedException;

/**
 * Created by xiaomi on 2017/10/17.
 */
public interface AddressManageService {

    Address createAddress(CreateAddress createAddress) throws AccessDeniedException;

    Address updateAddress(UpdateAddress updateAddress);

    class CreateAddress {
        String name;
        String metaId;
        String customize;
        Long order;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getMetaId() {
            return metaId;
        }

        public void setMetaId(String metaId) {
            this.metaId = metaId;
        }

        public String getCustomize() {
            return customize;
        }

        public void setCustomize(String customize) {
            this.customize = customize;
        }

        public Long getOrder() {
            return order;
        }

        public void setOrder(Long order) {
            this.order = order;
        }
    }

    class UpdateAddress extends CreateAddress {
        String addressId;
        Boolean deleted;
        Boolean enabled;

        public String getAddressId() {
            return addressId;
        }

        public void setAddressId(String addressId) {
            this.addressId = addressId;
        }

        public Boolean getDeleted() {
            return deleted;
        }

        public void setDeleted(Boolean deleted) {
            this.deleted = deleted;
        }

        public Boolean getEnabled() {
            return enabled;
        }

        public void setEnabled(Boolean enabled) {
            this.enabled = enabled;
        }
    }
}
